package cn.lger.dao;

import cn.lger.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.awt.print.Pageable;
import java.util.List;
import java.util.Optional;

/**
 * Code that Changed the World
 * Pro said
 * 专门用于访问user表
 * @author Pro
 * @date 2018-03-14
 */
@Repository
public interface UserDao extends JpaRepository<User, Integer> {
    /**
     * 根据用户名查找对象
     *
     * @param username 需要查找的用户名
     * @return 返回用户名对应的对象
     */
    User findByUsername(String username);
}
